package com.skillworld.webapp.model.bag;

import java.util.Iterator;

import org.hibernate.FetchMode;
import org.springframework.stereotype.Repository;

import com.skillworld.webapp.model.bag.Bag;
import com.skillworld.webapp.model.bag.BagDao;
import com.skillworld.webapp.model.util.dao.GenericDaoHibernate;

@Repository("BagDao")
public class BagDaoHibernate extends GenericDaoHibernate<Bag,Long> implements BagDao
{

    @SuppressWarnings("unchecked")
    public Iterator<Bag> iteratorFindAll()
    {
        
        return this.getSession().createCriteria(Bag.class)
            .list()
            .iterator();
    }
    
}
